home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Wallpaper Additional Folder.xpl < prev    next >
Text File  |  2004-01-30  |  2KB  |  72 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="4"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Desktop\Wallpaper"
  5. "NAME"="Wallpaper Additional Directory"
  6. "VERSION"="1.00"
  7. "LANGUAGE"="VBScript"
  8. "OSVERSION"="0011111"
  9. "TEXT 1"="Folder"
  10. "DESCRIPTION 1"="If you select the "Display" control inside your Control Panel, you can choose a wallpaper by selecting the "Desktop" tab."
  11. "DESCRIPTION 2"="The list that is visible inside this tab does normally only show the pictures of two folders: Your Windows folder (C:\Windows for example) and the wallpaper folder below it (%SystemRoot%\Web\Wallpaper). If you have your own folder for wallpapers and want to activate a picture from the folder, you always need to click on the "Browseà" button to do so."
  12. "DESCRIPTION 3"="To have the pictures from your folder directly selectable inside the "Desktop" tab, simply specify the folder here. That's much easier, isn't it? "
  13. "DESCRIPTION 4"="In case you want to restore the original value, simply clear the field and apply your change. "
  14. "AUTHOR"="Xteq Systems"
  15. "CONTACTURL"="http://www.xteq.com"
  16. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  17. "COMMENT 1"=" "
  18.  
  19.  
  20.    sV1="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WallPaperDir" 'REG_EXPAND_SZ
  21. sV1bak="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WallPaperDir.XSP.Backup" 'REG_EXPAND_SZ
  22. sDefault="%SystemRoot%\Web\Wallpaper"
  23.  
  24. Sub Plugin_Initialize 
  25.  Call ReadSettings
  26. End Sub
  27.  
  28. Sub ReadSettings
  29.  s=RegReadValue(sV1)
  30.  SetUIElement 1,s
  31. End Sub
  32.  
  33. Sub Plugin_CheckData(ElementIndex)
  34. End Sub
  35.  
  36. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  37.  s=GetUIElement(1)
  38.  if len(s)=0 then
  39.  
  40.     'restore original    
  41.     sBak=RegReadValue(sV1bak)
  42.     if len(sBak)=0 then
  43.        Call MsgError("Unable to restore the original value! Will apply default value!")
  44.        Call RegWriteValue(sV1,sDefault,4)
  45.     else
  46.        Call RegWriteValue(sV1,sBak,4)
  47.        Call RegDeleteValue(sV1bak) 
  48.     end if
  49.  
  50.  else
  51.     'apply new one
  52.     
  53.     'do we already have an backup? if so, do NOT save the new value
  54.     if RegValueExists(sV1bak)=true then
  55.        'do nothing
  56.     else
  57.        'save value
  58.        sOrg=RegReadValue(sV1)
  59.        Call RegWriteValue(sV1bak,sOrg,4)
  60.     end if
  61.   
  62.     'apply new value
  63.     Call RegWriteValue(sV1,s,4)
  64.  end if
  65.  
  66.  Call ReadSettings
  67.  Call IndicateSettingChange()
  68. End Sub
  69.  
  70. Sub Plugin_Terminate 
  71. End Sub
  72.